package com.bnz.pojo;

import com.baomidou.mybatisplus.annotation.*;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.time.LocalDateTime;


/**
 * 类名：
 * 作者：WF
 * 功能：
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class Student {
	@TableId(type = IdType.ASSIGN_ID) // 使用雪花算法生成的id
	private String sid;
	private String sname;
	private String sex;
	private Integer age;
	private String addr;
	private Integer cid;
	@TableField(fill = FieldFill.INSERT)
	private LocalDateTime createTime;
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private LocalDateTime updateTime;
	@TableField(exist = false)  //代表表字段不存在
	private String cname;
	@TableLogic
	private Integer deleted;

	public Student(String sname, String sex, Integer age, String addr, Integer cid) {
		this.sname = sname;
		this.sex = sex;
		this.age = age;
		this.addr = addr;
		this.cid = cid;
	}
}
